package com.henu.acmrating.service;

import com.henu.acmrating.dao.CommentMapper;
import com.henu.acmrating.pojo.Comment;
import com.henu.acmrating.pojo.CommentWithChildCommentList;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class CommentService{

    @Resource
    private CommentMapper commentMapper;

    
    public int deleteByPrimaryKey(Integer id) {
        return commentMapper.deleteByPrimaryKey(id);
    }

    
    public int insert(Comment record) {
        return commentMapper.insert(record);
    }

    
    public int insertOrUpdate(Comment record) {
        return commentMapper.insertOrUpdate(record);
    }

    
    public int insertOrUpdateSelective(Comment record) {
        return commentMapper.insertOrUpdateSelective(record);
    }

    
    public int insertSelective(Comment record) {
        return commentMapper.insertSelective(record);
    }

    
    public Comment selectByPrimaryKey(Integer id) {
        return commentMapper.selectByPrimaryKey(id);
    }

    
    public int updateByPrimaryKeySelective(Comment record) {
        return commentMapper.updateByPrimaryKeySelective(record);
    }

    
    public int updateByPrimaryKey(Comment record) {
        return commentMapper.updateByPrimaryKey(record);
    }

    
    public int updateBatch(List<Comment> list) {
        return commentMapper.updateBatch(list);
    }

    
    public int batchInsert(List<Comment> list) {
        return commentMapper.batchInsert(list);
    }


    public List<CommentWithChildCommentList> commentWithChild(Integer blogId) {
        return commentMapper.commentWithChild(blogId);
    }

    public List<Comment> selectByBlogId(Integer blogId) {
        return commentMapper.selectByBlogId(blogId);
    }
}
